<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!doctype html>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>项目增加量</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<script type="text/javascript" src="<%=path%>/resources/script/jquery/jquery-1.11.3.js"></script>
	<!-- 引入 ECharts 文件 -->
	<script src="<%=path %>/resources/script/echarts/echarts.js"></script>

  </head>
  
  <body>
  	<input id="portal" type="hidden" value="${portal }" />
  	<!-- 为 ECharts 准备一个具备大小（宽高）的Dom -->
    <div id="task_inc" style="width: 300px;height:130px; margin: 0 auto;"></div>
    
<script type="text/javascript">
	$(function(){
		var _portal = $('#portal').val();
		if (_portal == "") {
			$('#task_inc').width(600);
			$('#task_inc').height(500);
		}
		initCharts();
	});
	
	function initCharts() {
		// 基于准备好的dom，初始化echarts实例
	    var myChart = echarts.init(document.getElementById('task_inc'));
	
	    // 指定图表的配置项和数据
	    var option = {
		    title: {
		        text: '项目增量'
		    },
		    tooltip : {
		        trigger: 'axis'
		    },
		    legend: {
		        data:['项目增量']
		    },
		    toolbox: {
		        feature: {
		            saveAsImage: {}
		        }
		    },
		    grid: {
		        left: '3%',
		        right: '4%',
		        bottom: '3%',
		        containLabel: true
		    },
		    xAxis : [
		        {
		            type : 'category',
		            boundaryGap : false,
		            data : ['一月','二月','三月','四月','五月','六月',
		            '七月','八月','九月','十月','十一月','十二月']
		        }
		    ],
		    yAxis : [
		        {
		            type : 'value'
		        }
		    ],
		    series : [
		        {
		            name:'项目增量',
		            type:'line',
		            stack: '总量',
		            label: {
		                normal: {
		                    show: true,
		                    position: 'top',
		                    textStyle : {color : '#AED4C2'}
		                }
		            },
		            lineStyle : {
		            	normal: {color : '#AED4C2'}
		            },
		            areaStyle: {normal: {color : '#AED4C2'}},
		            data:[4, 9, 12, 13, 17, 20,
		            25, 28, 32, 36, 38, 39]
		        }
		    ]
		};
	
	
	    // 使用刚指定的配置项和数据显示图表。
	    myChart.setOption(option);
	}
</script>
  </body>
</html>
